function [DistributionFeatures] = Ddavid_get_distribution_features(AllDataTraining, AllDataTesting, SampledTrueLabelTraining, DataSampler, K, KL)

SizeTrainingData = size(AllDataTraining, 1);
SizeLabel = size(SampledTrueLabelTraining, 2);
[TrainingKNNList, TrainingSortedDistTable] = Ddavid_find_knn(SizeTrainingData - 1, AllDataTraining);
[TestingKNNList, TestingSortedDistTable] = Ddavid_find_knn_from_training_data(SizeTrainingData, AllDataTesting, AllDataTraining);

% Feature Labeled Rank
DistributionFeatures.TrainingLabeledRanksTable = Ddavid_get_feature_labeled_ranks_training(SampledTrueLabelTraining, K, KL, TrainingKNNList);
DistributionFeatures.TestingLabeledRanksTable = Ddavid_get_feature_labeled_ranks_testing(SampledTrueLabelTraining, K, KL, TestingKNNList);

% Feature Density
TrainingDensityTable = Ddavid_get_feature_density_in_Kth_distance(TrainingSortedDistTable, K);
TestingDensityTable = Ddavid_get_feature_density_in_Kth_distance(TestingSortedDistTable, K);

% Normalize Feature Density
MaxDensity = max(TrainingDensityTable);
DistributionFeatures.TrainingDensityTable = TrainingDensityTable / MaxDensity;
DistributionFeatures.TestingDensityTable = TestingDensityTable / MaxDensity;

% Feature Common Neighbor
DistributionFeatures.TrainingCommonNeighborTable = Ddavid_get_feature_common_neighbor(DataSampler, SizeLabel, K, TrainingKNNList, TrainingKNNList, SampledTrueLabelTraining);
DistributionFeatures.TestingCommonNeighborTable = Ddavid_get_feature_common_neighbor(DataSampler, SizeLabel, K, TestingKNNList, TrainingKNNList, SampledTrueLabelTraining);
